From: Benjamin Otte Date: Tue, 17 Jan 2012 11:14:50 +0000 (+0100) Subject: reftests: Add a bunch of linear gradient tests X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~39^2~18193 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=d56ac0d4df0266489290a4cb2913d2b94e854ddf;p=gtk%2B3.0.git reftests: Add a bunch of linear gradient tests --- diff --git a/tests/reftests/linear-gradient.css b/tests/reftests/linear-gradient.css new file mode 100644 index 0000000000..d6ed0d0d1b --- /dev/null +++ b/tests/reftests/linear-gradient.css @@ -0,0 +1,35 @@ +@import url("reset-to-defaults.css"); + +/* One caveat that apply to cairo gradients, and make things therefor + * untestable: + * The start and end points must be identical when drawing + * This means that you cannot: + * ... add extra color stops, even if they'd be invisible + * ... mirror the gradient (ie 'to left, red, green' vs 'to right, green, red') + * and probably a bunch of other things. + * These things can cause off-by-one rounding errors in pixman (and probably + * your GPU, too) and that'd trigger test failures. + */ +#a { + background-image: linear-gradient(to bottom, blue 0%, green 15px, red 100%); +} + +#reference #a { + background-image: linear-gradient(blue, green, red); +} + +#b { + background-image: linear-gradient(to left, pink 0, cyan, red 0, green 50%, blue 40px, violet -10em); +} + +#reference #b { + background-image: linear-gradient(270deg, red, green, blue); +} + +#c { + background-image: repeating-linear-gradient(3.5turn, red, green 10px, red 20px); +} + +#reference #c { + background-image: linear-gradient(to bottom, red, green 10px, red 20px, green 30px, red 40px); +} diff --git a/tests/reftests/linear-gradient.ref.ui b/tests/reftests/linear-gradient.ref.ui new file mode 100644 index 0000000000..e7f5a6084c --- /dev/null +++ b/tests/reftests/linear-gradient.ref.ui @@ -0,0 +1,67 @@ + + + + + False + popup + + + True + False + vertical + reference + + + False + 40 + 30 + True + True + True + False + a + + + False + True + 0 + + + + + False + 40 + 30 + True + True + True + False + b + + + False + True + 1 + + + + + False + 40 + 30 + True + True + True + False + c + + + False + True + 2 + + + + + + diff --git a/tests/reftests/linear-gradient.ui b/tests/reftests/linear-gradient.ui new file mode 100644 index 0000000000..adbfbe22e8 --- /dev/null +++ b/tests/reftests/linear-gradient.ui @@ -0,0 +1,66 @@ + + + + + False + popup + + + True + False + vertical + + + False + 40 + 30 + True + True + True + False + a + + + False + True + 0 + + + + + False + 40 + 30 + True + True + True + False + b + + + False + True + 1 + + + + + False + 40 + 30 + True + True + True + False + c + + + False + True + 2 + + + + + +